package com.mastercard.labs

class CardService {
	
	/**
	 * This will return all cards belong to user
	 * @param user
	 * @return arraylist of cards
	 */
	def getCards(User user) {
		def userCards = UserCard.findAllByUser(user)
		ArrayList cards = new ArrayList()
		for (UserCard uCard in userCards) {
			cards.add(uCard.card)
		}
		return cards
	}
}
